//
//  TextFieldViewController.m
//  TextField
//

#import "TextFieldViewController.h"

@implementation TextFieldViewController

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
	[textField resignFirstResponder];
	return YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];

	CGRect textRect = CGRectMake(10, 10, 300, 26);
	UITextField *myTextField = [[UITextField alloc] initWithFrame:textRect];
	myTextField.delegate = self;
	myTextField.borderStyle = UITextBorderStyleRoundedRect;

	myTextField.font = [UIFont systemFontOfSize:22.0];
	myTextField.adjustsFontSizeToFitWidth = YES;
	myTextField.minimumFontSize = 2.0;
	
	myTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
	myTextField.keyboardType = UIKeyboardTypeDefault;
	myTextField.autocorrectionType = UITextAutocorrectionTypeNo;
	myTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
	myTextField.returnKeyType = UIReturnKeyDone;
	
	myTextField.secureTextEntry = YES;

	[myTextField becomeFirstResponder];

	[self.view addSubview:myTextField];
	[myTextField release];
}

- (void)dealloc {
    [super dealloc];
}

@end
